#pragma once
#include "UIControl.h"
#include "ObjList.h"

struct PadItem
{
	DWORD dwGameId;
    CxImage imgItem;
	CRect rcItem;
};

class CUIPad :	public CUIControl
{
	enum Pad_Action
	{
		Pad_Item_Select = UIAction_User_Defined + 1,
	};

	enum
	{
		PadItem_Normal_Width = 80,
		PadItem_Large_Width = 100,
		PadItem_Normal_Height = 80,
		PadItem_Large_Height = 100,
	};
public:
	CUIPad(void);
	~CUIPad(void);

	BOOL Create(CString szBmpFile, CRect rcBound, CUIControl *pParent);
	virtual void Render(CDC *pDC);
	void RenderItem(CDC *pDC, PadItem &item, BOOL bHover);
	virtual BOOL OnLButtonDown(UINT nFlags, CPoint point);
	virtual BOOL OnMouseOver(UINT nFlags, CPoint point);
	virtual BOOL OnMouseOut();
    virtual void SetBound(CRect rcBound);
	void AddItem(PadItem &item);
    
public:
	CxImage m_imgBk;
	int m_nHovered;
	int m_nScrollPos;
	CObjList<PadItem> m_listItem;
};
